package com.studentmanage.framework.domain.base;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;

import javax.persistence.*;
import java.util.Date;

@Data
@ToString
@Entity
@Table(name="student")
public class Student {
    @Id
    private String id;
    private String name;
    private String sex;
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date birthday;
    @Column(name = "native")
    private String homeNative;
    @Column(name = "entrancetime")
    private String entranceTime;
    private String address;
    private String telephone;
    @Column(name = "homephone")
    private String homePhone;
    @Column(name = "idnum")
    private String idNum;
    @Column(name = "classid")
    private String classId;
    private String national;
    private String status;
    private String mather;
    private String father;
    private String educational;
    private String grade;
    private String face;

    public String getStatus(){
        if(this.status.equals("1")){
            return "本科";
        }else{
            return "研究生";
        }
    }
    public void setStatus(String status){
        this.status = status;
    }
}
